package VWorldGameStudio.touzi;

import java.io.Serializable;
import java.util.Random;

import static FCRendering.FCRMaster.fcv;
import static FCRendering.FCRMaster.player1;

public class BaiShuDIProject extends FCTouZiProject{
    /**
     * 10000G，加一个工人，收益每1分钟30G，最大4个工人，收益是200份1,
     * 加上几率收成问题 最大收益是600G一分钟
     */
    public BaiShuDIProject() {
        projectCHName = "白薯地投资";
        projectEnName = "baishuDi";
        minTouziMoney = 200;
        ad = "农业是家国重本!";
    }

    public BaiShuDIProject(FCTouZiProject tmp){
        super(tmp);
    }

    public int getHuiBaoMoney() {
        int willGetMoney = touZiMoney/200;

        if(willGetMoney > 0){
            willGetMoney = Math.min(600, willGetMoney);
            Random random = new Random();
            if(random.nextFloat() > 0.3){
                fcv.getMessage().add("从白薯地投资获得收益 +"+willGetMoney+"G");
                fcv.showMessage();
                allGetShouYiMoney += willGetMoney;
                player1.setMoney(player1.getMoney()+willGetMoney);
            }else {
                fcv.getMessage().add("白薯地产出受天气影响，没有收益");
                fcv.showMessage();
            }
        }
        return 0;
    }
}
